class GoodsDetailsModel {
  dynamic uid;
  List<ProductAttr>? productAttr;
  StoreInfo? storeInfo;
  dynamic svipOpen;
  dynamic priceName;
  Reply? reply;
  dynamic replyChance;
  dynamic replyCount;
  dynamic merId;
  List<GoodList>? goodList;
  dynamic mapKey;
  dynamic storeSelfMention;
  List<Activity>? activity;
  List<Coupons>? coupons;
  dynamic routineContactType;

  GoodsDetailsModel(
      {this.uid,
      this.productAttr,
      this.storeInfo,
      this.svipOpen,
      this.priceName,
      this.reply,
      this.replyChance,
      this.replyCount,
      this.merId,
      this.goodList,
      this.mapKey,
      this.storeSelfMention,
      this.activity,
      this.coupons,
      this.routineContactType});

  GoodsDetailsModel.fromJson(Map<String, dynamic> json) {
    uid = json['uid'];
    if (json['productAttr'] != null) {
      productAttr = <ProductAttr>[];
      json['productAttr'].forEach((v) {
        productAttr!.add(new ProductAttr.fromJson(v));
      });
    }
    storeInfo = json['storeInfo'] != null
        ? new StoreInfo.fromJson(json['storeInfo'])
        : null;
    svipOpen = json['svip_open'];
    priceName = json['priceName'];
    reply = json['reply'] != null ? new Reply.fromJson(json['reply']) : null;
    replyChance = json['replyChance'];
    replyCount = json['replyCount'];
    merId = json['mer_id'];
    if (json['good_list'] != null) {
      goodList = <GoodList>[];
      json['good_list'].forEach((v) {
        goodList!.add(new GoodList.fromJson(v));
      });
    }
    mapKey = json['mapKey'];
    storeSelfMention = json['store_self_mention'];
    if (json['activity'] != null) {
      activity = <Activity>[];
      json['activity'].forEach((v) {
        activity!.add(new Activity.fromJson(v));
      });
    }
    if (json['coupons'] != null) {
      coupons = <Coupons>[];
      json['coupons'].forEach((v) {
        coupons!.add(new Coupons.fromJson(v));
      });
    }
    routineContactType = json['routine_contact_type'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['uid'] = this.uid;
    if (this.productAttr != null) {
      data['productAttr'] = this.productAttr!.map((v) => v.toJson()).toList();
    }

    if (this.storeInfo != null) {
      data['storeInfo'] = this.storeInfo!.toJson();
    }
    data['svip_open'] = this.svipOpen;
    data['priceName'] = this.priceName;
    if (this.reply != null) {
      data['reply'] = this.reply!.toJson();
    }
    data['replyChance'] = this.replyChance;
    data['replyCount'] = this.replyCount;
    data['mer_id'] = this.merId;
    if (this.goodList != null) {
      data['good_list'] = this.goodList!.map((v) => v.toJson()).toList();
    }
    data['mapKey'] = this.mapKey;
    data['store_self_mention'] = this.storeSelfMention;
    if (this.activity != null) {
      data['activity'] = this.activity!.map((v) => v.toJson()).toList();
    }
    if (this.coupons != null) {
      data['coupons'] = this.coupons!.map((v) => v.toJson()).toList();
    }
    data['routine_contact_type'] = this.routineContactType;
    return data;
  }
}

class ProductAttr {
  int? id;
  int? productId;
  String? attrName;
  List<String>? attrValues;
  int? type;
  List<AttrValue>? attrValue;

  ProductAttr(
      {this.id,
      this.productId,
      this.attrName,
      this.attrValues,
      this.type,
      this.attrValue});

  ProductAttr.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    productId = json['product_id'];
    attrName = json['attr_name'];
    attrValues = json['attr_values'].cast<String>();
    type = json['type'];
    if (json['attr_value'] != null) {
      attrValue = <AttrValue>[];
      json['attr_value'].forEach((v) {
        attrValue!.add(new AttrValue.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['product_id'] = this.productId;
    data['attr_name'] = this.attrName;
    data['attr_values'] = this.attrValues;
    data['type'] = this.type;
    if (this.attrValue != null) {
      data['attr_value'] = this.attrValue!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class AttrValue {
  String? attr;
  bool? check;

  AttrValue({this.attr, this.check});

  AttrValue.fromJson(Map<String, dynamic> json) {
    attr = json['attr'];
    check = json['check'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['attr'] = this.attr;
    data['check'] = this.check;
    return data;
  }
}

class L {
  int? id;
  int? productId;
  String? suk;
  int? stock;
  int? sales;
  String? price;
  String? image;
  String? unique;
  String? cost;
  String? barCode;
  String? otPrice;
  int? vipPrice;
  String? weight;
  String? volume;
  String? brokerage;
  String? brokerageTwo;
  int? type;
  int? quota;
  int? quotaShow;
  int? isVirtual;
  int? couponId;
  String? diskInfo;
  int? productStock;

  L(
      {this.id,
      this.productId,
      this.suk,
      this.stock,
      this.sales,
      this.price,
      this.image,
      this.unique,
      this.cost,
      this.barCode,
      this.otPrice,
      this.vipPrice,
      this.weight,
      this.volume,
      this.brokerage,
      this.brokerageTwo,
      this.type,
      this.quota,
      this.quotaShow,
      this.isVirtual,
      this.couponId,
      this.diskInfo,
      this.productStock});

  L.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    productId = json['product_id'];
    suk = json['suk'];
    stock = json['stock'];
    sales = json['sales'];
    price = json['price'];
    image = json['image'];
    unique = json['unique'];
    cost = json['cost'];
    barCode = json['bar_code'];
    otPrice = json['ot_price'];
    vipPrice = json['vip_price'];
    weight = json['weight'];
    volume = json['volume'];
    brokerage = json['brokerage'];
    brokerageTwo = json['brokerage_two'];
    type = json['type'];
    quota = json['quota'];
    quotaShow = json['quota_show'];
    isVirtual = json['is_virtual'];
    couponId = json['coupon_id'];
    diskInfo = json['disk_info'];
    productStock = json['product_stock'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['product_id'] = this.productId;
    data['suk'] = this.suk;
    data['stock'] = this.stock;
    data['sales'] = this.sales;
    data['price'] = this.price;
    data['image'] = this.image;
    data['unique'] = this.unique;
    data['cost'] = this.cost;
    data['bar_code'] = this.barCode;
    data['ot_price'] = this.otPrice;
    data['vip_price'] = this.vipPrice;
    data['weight'] = this.weight;
    data['volume'] = this.volume;
    data['brokerage'] = this.brokerage;
    data['brokerage_two'] = this.brokerageTwo;
    data['type'] = this.type;
    data['quota'] = this.quota;
    data['quota_show'] = this.quotaShow;
    data['is_virtual'] = this.isVirtual;
    data['coupon_id'] = this.couponId;
    data['disk_info'] = this.diskInfo;
    data['product_stock'] = this.productStock;
    return data;
  }
}

class StoreInfo {
  dynamic id;
  dynamic merId;
  dynamic image;
  String? recommendImage;
  List<String>? sliderImage;
  String? storeName;
  String? storeInfo;
  String? keyword;
  String? barCode;
  String? cateId;
  dynamic price;
  dynamic vipPrice;
  dynamic otPrice;
  String? postage;
  String? unitName;
  int? sort;
  int? sales;
  int? stock;
  int? isShow;
  int? isHot;
  int? isBenefit;
  int? isBest;
  int? isNew;
  int? isVirtual;
  int? virtualType;
  int? addTime;
  int? isPostage;
  int? isDel;
  int? merUse;
  String? giveIntegral;
  String? cost;
  int? isSeckill;
  int? isBargain;
  int? isGood;
  int? isSub;
  int? isVip;
  int? ficti;
  int? browse;
  String? codePath;
  String? soureLink;
  String? videoLink;
  int? tempId;
  int? specType;
  String? activity;
  String? spu;
  String? labelId;
  String? commandWord;
  String? recommendList;
  int? vipProduct;
  int? presale;
  String? presaleStartTime;
  String? presaleEndTime;
  int? presaleDay;
  String? logistics;
  int? freight;
  String? description;
  String? imageBase;
  int? fsales;
  String? codeBase;
  bool? userCollect;
  bool? userLike;
  String? smallImage;
  int? presalePayStatus;
  int? cartButton;
  String? svipEconomizePrice;

  StoreInfo(
      {this.id,
      this.merId,
      this.image,
      this.recommendImage,
      this.sliderImage,
      this.storeName,
      this.storeInfo,
      this.keyword,
      this.barCode,
      this.cateId,
      this.price,
      this.vipPrice,
      this.otPrice,
      this.postage,
      this.unitName,
      this.sort,
      this.sales,
      this.stock,
      this.isShow,
      this.isHot,
      this.isBenefit,
      this.isBest,
      this.isNew,
      this.isVirtual,
      this.virtualType,
      this.addTime,
      this.isPostage,
      this.isDel,
      this.merUse,
      this.giveIntegral,
      this.cost,
      this.isSeckill,
      this.isBargain,
      this.isGood,
      this.isSub,
      this.isVip,
      this.ficti,
      this.browse,
      this.codePath,
      this.soureLink,
      this.videoLink,
      this.tempId,
      this.specType,
      this.activity,
      this.spu,
      this.labelId,
      this.commandWord,
      this.recommendList,
      this.vipProduct,
      this.presale,
      this.presaleStartTime,
      this.presaleEndTime,
      this.presaleDay,
      this.logistics,
      this.freight,
      this.description,
      this.imageBase,
      this.fsales,
      this.codeBase,
      this.userCollect,
      this.userLike,
      this.smallImage,
      this.presalePayStatus,
      this.cartButton,
      this.svipEconomizePrice});

  StoreInfo.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    merId = json['mer_id'];
    image = json['image'];
    recommendImage = json['recommend_image'];
    sliderImage = json['slider_image'].cast<String>();
    storeName = json['store_name'];
    storeInfo = json['store_info'];
    keyword = json['keyword'];
    barCode = json['bar_code'];
    cateId = json['cate_id'];
    price = json['price'];
    vipPrice = json['vip_price'];
    otPrice = json['ot_price'];
    postage = json['postage'];
    unitName = json['unit_name'];
    sort = json['sort'];
    sales = json['sales'];
    stock = json['stock'];
    isShow = json['is_show'];
    isHot = json['is_hot'];
    isBenefit = json['is_benefit'];
    isBest = json['is_best'];
    isNew = json['is_new'];
    isVirtual = json['is_virtual'];
    virtualType = json['virtual_type'];
    addTime = json['add_time'];
    isPostage = json['is_postage'];
    isDel = json['is_del'];
    merUse = json['mer_use'];
    giveIntegral = json['give_integral'];
    cost = json['cost'];
    isSeckill = json['is_seckill'];
    isBargain = json['is_bargain'];
    isGood = json['is_good'];
    isSub = json['is_sub'];
    isVip = json['is_vip'];
    ficti = json['ficti'];
    browse = json['browse'];
    codePath = json['code_path'];
    soureLink = json['soure_link'];
    videoLink = json['video_link'];
    tempId = json['temp_id'];
    specType = json['spec_type'];
    activity = json['activity'];
    spu = json['spu'];
    labelId = json['label_id'];
    commandWord = json['command_word'];
    recommendList = json['recommend_list'];
    vipProduct = json['vip_product'];
    presale = json['presale'];
    presaleStartTime = json['presale_start_time'];
    presaleEndTime = json['presale_end_time'];
    presaleDay = json['presale_day'];
    logistics = json['logistics'];
    freight = json['freight'];

    description = json['description'];
    imageBase = json['image_base'];
    fsales = json['fsales'];
    codeBase = json['code_base'];
    userCollect = json['userCollect'];
    userLike = json['userLike'];
    smallImage = json['small_image'];
    presalePayStatus = json['presale_pay_status'];
    cartButton = json['cart_button'];
    svipEconomizePrice = json['svip_economize_price'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['mer_id'] = this.merId;
    data['image'] = this.image;
    data['recommend_image'] = this.recommendImage;
    data['slider_image'] = this.sliderImage;
    data['store_name'] = this.storeName;
    data['store_info'] = this.storeInfo;
    data['keyword'] = this.keyword;
    data['bar_code'] = this.barCode;
    data['cate_id'] = this.cateId;
    data['price'] = this.price;
    data['vip_price'] = this.vipPrice;
    data['ot_price'] = this.otPrice;
    data['postage'] = this.postage;
    data['unit_name'] = this.unitName;
    data['sort'] = this.sort;
    data['sales'] = this.sales;
    data['stock'] = this.stock;
    data['is_show'] = this.isShow;
    data['is_hot'] = this.isHot;
    data['is_benefit'] = this.isBenefit;
    data['is_best'] = this.isBest;
    data['is_new'] = this.isNew;
    data['is_virtual'] = this.isVirtual;
    data['virtual_type'] = this.virtualType;
    data['add_time'] = this.addTime;
    data['is_postage'] = this.isPostage;
    data['is_del'] = this.isDel;
    data['mer_use'] = this.merUse;
    data['give_integral'] = this.giveIntegral;
    data['cost'] = this.cost;
    data['is_seckill'] = this.isSeckill;
    data['is_bargain'] = this.isBargain;
    data['is_good'] = this.isGood;
    data['is_sub'] = this.isSub;
    data['is_vip'] = this.isVip;
    data['ficti'] = this.ficti;
    data['browse'] = this.browse;
    data['code_path'] = this.codePath;
    data['soure_link'] = this.soureLink;
    data['video_link'] = this.videoLink;
    data['temp_id'] = this.tempId;
    data['spec_type'] = this.specType;
    data['activity'] = this.activity;
    data['spu'] = this.spu;
    data['label_id'] = this.labelId;
    data['command_word'] = this.commandWord;
    data['recommend_list'] = this.recommendList;
    data['vip_product'] = this.vipProduct;
    data['presale'] = this.presale;
    data['presale_start_time'] = this.presaleStartTime;
    data['presale_end_time'] = this.presaleEndTime;
    data['presale_day'] = this.presaleDay;
    data['logistics'] = this.logistics;
    data['freight'] = this.freight;

    data['description'] = this.description;
    data['image_base'] = this.imageBase;
    data['fsales'] = this.fsales;
    data['code_base'] = this.codeBase;
    data['userCollect'] = this.userCollect;
    data['userLike'] = this.userLike;
    data['small_image'] = this.smallImage;
    data['presale_pay_status'] = this.presalePayStatus;
    data['cart_button'] = this.cartButton;
    data['svip_economize_price'] = this.svipEconomizePrice;
    return data;
  }
}

class Reply {
  int? id;
  int? uid;
  int? oid;
  String? unique;
  int? productId;
  String? replyType;
  int? productScore;
  int? serviceScore;
  String? comment;
  String? addTime;
  String? merchantReplyContent;
  String? merchantReplyTime;
  int? isDel;
  int? isReply;
  String? nickname;
  String? avatar;
  Null? cartInfo;
  Null? isMoneyLevel;
  String? suk;
  String? star;

  Reply(
      {this.id,
      this.uid,
      this.oid,
      this.unique,
      this.productId,
      this.replyType,
      this.productScore,
      this.serviceScore,
      this.comment,
      this.addTime,
      this.merchantReplyContent,
      this.merchantReplyTime,
      this.isDel,
      this.isReply,
      this.nickname,
      this.avatar,
      this.cartInfo,
      this.isMoneyLevel,
      this.suk,
      this.star});

  Reply.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    uid = json['uid'];
    oid = json['oid'];
    unique = json['unique'];
    productId = json['product_id'];
    replyType = json['reply_type'];
    productScore = json['product_score'];
    serviceScore = json['service_score'];
    comment = json['comment'];

    addTime = json['add_time'];
    merchantReplyContent = json['merchant_reply_content'];
    merchantReplyTime = json['merchant_reply_time'];
    isDel = json['is_del'];
    isReply = json['is_reply'];
    nickname = json['nickname'];
    avatar = json['avatar'];
    cartInfo = json['cart_info'];
    isMoneyLevel = json['is_money_level'];
    suk = json['suk'];
    star = json['star'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['uid'] = this.uid;
    data['oid'] = this.oid;
    data['unique'] = this.unique;
    data['product_id'] = this.productId;
    data['reply_type'] = this.replyType;
    data['product_score'] = this.productScore;
    data['service_score'] = this.serviceScore;
    data['comment'] = this.comment;

    data['add_time'] = this.addTime;
    data['merchant_reply_content'] = this.merchantReplyContent;
    data['merchant_reply_time'] = this.merchantReplyTime;
    data['is_del'] = this.isDel;
    data['is_reply'] = this.isReply;
    data['nickname'] = this.nickname;
    data['avatar'] = this.avatar;
    data['cart_info'] = this.cartInfo;
    data['is_money_level'] = this.isMoneyLevel;
    data['suk'] = this.suk;
    data['star'] = this.star;
    return data;
  }
}

class GoodList {
  int? id;
  String? storeName;
  String? cateId;
  String? image;
  String? sales;
  String? price;
  int? stock;
  List<Null>? activity;
  String? unitName;
  int? presale;
  String? description;
  List<Null>? couponId;
  bool? checkCoupon;

  GoodList(
      {this.id,
      this.storeName,
      this.cateId,
      this.image,
      this.sales,
      this.price,
      this.stock,
      this.activity,
      this.unitName,
      this.presale,
      this.description,
      this.couponId,
      this.checkCoupon});

  GoodList.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    storeName = json['store_name'];
    cateId = json['cate_id'];
    image = json['image'];
    sales = json['sales'];
    price = json['price'];
    stock = json['stock'];

    unitName = json['unit_name'];
    presale = json['presale'];
    description = json['description'];

    checkCoupon = json['checkCoupon'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['store_name'] = this.storeName;
    data['cate_id'] = this.cateId;
    data['image'] = this.image;
    data['sales'] = this.sales;
    data['price'] = this.price;
    data['stock'] = this.stock;

    data['unit_name'] = this.unitName;
    data['presale'] = this.presale;
    data['description'] = this.description;

    data['checkCoupon'] = this.checkCoupon;
    return data;
  }
}

class Activity {
  String? type;
  int? id;

  Activity({this.type, this.id});

  Activity.fromJson(Map<String, dynamic> json) {
    type = json['type'];
    id = json['id'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['type'] = this.type;
    data['id'] = this.id;
    return data;
  }
}

class Coupons {
  int? id;
  int? cid;
  String? couponTitle;
  int? startTime;
  int? endTime;
  int? totalCount;
  int? remainCount;
  int? isPermanent;
  int? status;
  int? isGiveSubscribe;
  int? isFullGive;
  String? fullReduction;
  int? isDel;
  int? addTime;
  String? title;
  int? integral;
  int? couponPrice;
  int? useMinPrice;
  int? couponTime;
  String? productId;
  int? categoryId;
  int? type;
  int? receiveType;
  int? startUseTime;
  int? endUseTime;
  int? sort;
  Null? used;
  bool? isUse;

  Coupons(
      {this.id,
      this.cid,
      this.couponTitle,
      this.startTime,
      this.endTime,
      this.totalCount,
      this.remainCount,
      this.isPermanent,
      this.status,
      this.isGiveSubscribe,
      this.isFullGive,
      this.fullReduction,
      this.isDel,
      this.addTime,
      this.title,
      this.integral,
      this.couponPrice,
      this.useMinPrice,
      this.couponTime,
      this.productId,
      this.categoryId,
      this.type,
      this.receiveType,
      this.startUseTime,
      this.endUseTime,
      this.sort,
      this.used,
      this.isUse});

  Coupons.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    cid = json['cid'];
    couponTitle = json['coupon_title'];
    startTime = json['start_time'];
    endTime = json['end_time'];
    totalCount = json['total_count'];
    remainCount = json['remain_count'];
    isPermanent = json['is_permanent'];
    status = json['status'];
    isGiveSubscribe = json['is_give_subscribe'];
    isFullGive = json['is_full_give'];
    fullReduction = json['full_reduction'];
    isDel = json['is_del'];
    addTime = json['add_time'];
    title = json['title'];
    integral = json['integral'];
    couponPrice = json['coupon_price'];
    useMinPrice = json['use_min_price'];
    couponTime = json['coupon_time'];
    productId = json['product_id'];
    categoryId = json['category_id'];
    type = json['type'];
    receiveType = json['receive_type'];
    startUseTime = json['start_use_time'];
    endUseTime = json['end_use_time'];
    sort = json['sort'];
    used = json['used'];
    isUse = json['is_use'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['cid'] = this.cid;
    data['coupon_title'] = this.couponTitle;
    data['start_time'] = this.startTime;
    data['end_time'] = this.endTime;
    data['total_count'] = this.totalCount;
    data['remain_count'] = this.remainCount;
    data['is_permanent'] = this.isPermanent;
    data['status'] = this.status;
    data['is_give_subscribe'] = this.isGiveSubscribe;
    data['is_full_give'] = this.isFullGive;
    data['full_reduction'] = this.fullReduction;
    data['is_del'] = this.isDel;
    data['add_time'] = this.addTime;
    data['title'] = this.title;
    data['integral'] = this.integral;
    data['coupon_price'] = this.couponPrice;
    data['use_min_price'] = this.useMinPrice;
    data['coupon_time'] = this.couponTime;
    data['product_id'] = this.productId;
    data['category_id'] = this.categoryId;
    data['type'] = this.type;
    data['receive_type'] = this.receiveType;
    data['start_use_time'] = this.startUseTime;
    data['end_use_time'] = this.endUseTime;
    data['sort'] = this.sort;
    data['used'] = this.used;
    data['is_use'] = this.isUse;
    return data;
  }
}
